/*
 *  This file is part of the SIRIUS libraries for analyzing MS and MS/MS data
 *
 *  Copyright (C) 2024 Bright Giant GmbH
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along with SIRIUS.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 *  https://openapi-generator.tech
 *  Do not edit the class manually.
 */


package io.sirius.ms.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.sirius.ms.sdk.model.Job;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * BackgroundComputationsStateEvent
 */
@JsonPropertyOrder({
  BackgroundComputationsStateEvent.JSON_PROPERTY_AFFECTED_JOBS,
  BackgroundComputationsStateEvent.JSON_PROPERTY_NUMBER_OF_JOBS,
  BackgroundComputationsStateEvent.JSON_PROPERTY_NUMBER_OF_RUNNING_JOBS,
  BackgroundComputationsStateEvent.JSON_PROPERTY_NUMBER_OF_FINISHED_JOBS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
public class BackgroundComputationsStateEvent {
  public static final String JSON_PROPERTY_AFFECTED_JOBS = "affectedJobs";
  @jakarta.annotation.Nonnull
  private List<Job> affectedJobs = new ArrayList<>();

  public static final String JSON_PROPERTY_NUMBER_OF_JOBS = "numberOfJobs";
  @jakarta.annotation.Nonnull
  private Integer numberOfJobs;

  public static final String JSON_PROPERTY_NUMBER_OF_RUNNING_JOBS = "numberOfRunningJobs";
  @jakarta.annotation.Nonnull
  private Integer numberOfRunningJobs;

  public static final String JSON_PROPERTY_NUMBER_OF_FINISHED_JOBS = "numberOfFinishedJobs";
  @jakarta.annotation.Nonnull
  private Integer numberOfFinishedJobs;

  public BackgroundComputationsStateEvent() {
  }

  public BackgroundComputationsStateEvent affectedJobs(@jakarta.annotation.Nonnull List<Job> affectedJobs) {
    
    this.affectedJobs = affectedJobs;
    return this;
  }

  public BackgroundComputationsStateEvent addAffectedJobsItem(Job affectedJobsItem) {
    if (this.affectedJobs == null) {
      this.affectedJobs = new ArrayList<>();
    }
    this.affectedJobs.add(affectedJobsItem);
    return this;
  }

  /**
   * Get affectedJobs
   * @return affectedJobs
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_AFFECTED_JOBS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public List<Job> getAffectedJobs() {
    return affectedJobs;
  }


  @JsonProperty(JSON_PROPERTY_AFFECTED_JOBS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setAffectedJobs(@jakarta.annotation.Nonnull List<Job> affectedJobs) {
    this.affectedJobs = affectedJobs;
  }

  public BackgroundComputationsStateEvent numberOfJobs(@jakarta.annotation.Nonnull Integer numberOfJobs) {
    
    this.numberOfJobs = numberOfJobs;
    return this;
  }

  /**
   * Get numberOfJobs
   * @return numberOfJobs
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_NUMBER_OF_JOBS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Integer getNumberOfJobs() {
    return numberOfJobs;
  }


  @JsonProperty(JSON_PROPERTY_NUMBER_OF_JOBS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setNumberOfJobs(@jakarta.annotation.Nonnull Integer numberOfJobs) {
    this.numberOfJobs = numberOfJobs;
  }

  public BackgroundComputationsStateEvent numberOfRunningJobs(@jakarta.annotation.Nonnull Integer numberOfRunningJobs) {
    
    this.numberOfRunningJobs = numberOfRunningJobs;
    return this;
  }

  /**
   * Get numberOfRunningJobs
   * @return numberOfRunningJobs
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_NUMBER_OF_RUNNING_JOBS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Integer getNumberOfRunningJobs() {
    return numberOfRunningJobs;
  }


  @JsonProperty(JSON_PROPERTY_NUMBER_OF_RUNNING_JOBS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setNumberOfRunningJobs(@jakarta.annotation.Nonnull Integer numberOfRunningJobs) {
    this.numberOfRunningJobs = numberOfRunningJobs;
  }

  public BackgroundComputationsStateEvent numberOfFinishedJobs(@jakarta.annotation.Nonnull Integer numberOfFinishedJobs) {
    
    this.numberOfFinishedJobs = numberOfFinishedJobs;
    return this;
  }

  /**
   * Get numberOfFinishedJobs
   * @return numberOfFinishedJobs
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_NUMBER_OF_FINISHED_JOBS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Integer getNumberOfFinishedJobs() {
    return numberOfFinishedJobs;
  }


  @JsonProperty(JSON_PROPERTY_NUMBER_OF_FINISHED_JOBS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setNumberOfFinishedJobs(@jakarta.annotation.Nonnull Integer numberOfFinishedJobs) {
    this.numberOfFinishedJobs = numberOfFinishedJobs;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BackgroundComputationsStateEvent backgroundComputationsStateEvent = (BackgroundComputationsStateEvent) o;
    return Objects.equals(this.affectedJobs, backgroundComputationsStateEvent.affectedJobs) &&
        Objects.equals(this.numberOfJobs, backgroundComputationsStateEvent.numberOfJobs) &&
        Objects.equals(this.numberOfRunningJobs, backgroundComputationsStateEvent.numberOfRunningJobs) &&
        Objects.equals(this.numberOfFinishedJobs, backgroundComputationsStateEvent.numberOfFinishedJobs);
  }

  @Override
  public int hashCode() {
    return Objects.hash(affectedJobs, numberOfJobs, numberOfRunningJobs, numberOfFinishedJobs);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class BackgroundComputationsStateEvent {\n");
    sb.append("    affectedJobs: ").append(toIndentedString(affectedJobs)).append("\n");
    sb.append("    numberOfJobs: ").append(toIndentedString(numberOfJobs)).append("\n");
    sb.append("    numberOfRunningJobs: ").append(toIndentedString(numberOfRunningJobs)).append("\n");
    sb.append("    numberOfFinishedJobs: ").append(toIndentedString(numberOfFinishedJobs)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

